package com.bqtt.tumor.demo.business;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.bqtt.tumor.demo.entity.Desease;
import com.bqtt.tumor.demo.entity.Feature;

public class BrainTumourService {

	private static Logger log = LoggerFactory.getLogger(BrainTumourService.class);
	
	public static List<Feature> getClinicInfoList()
	{
		List<Feature> result = new ArrayList<Feature>();
		Desease brainTumor = DeseaseService.getDeseaseByCode("010001001");
		String clinicString = brainTumor.getClinic_feature();
		if(clinicString!=null)
		{
			String [] features = clinicString.split("\\|");
			
			for(String item:features)
			{
				Feature temp = FeatureService.getFeatureInfoById(Integer.parseInt(item));
				if(temp!=null)
				   result.add(temp);
			}
		}
		return result;
	}
	
	public static List<Feature> getAllClinicInfoList()
	{ 
		return FeatureService.getList(0,1);
	}
	
}
